{% extends "personal_center/base.html" %}
{% load set_val %}
{% load state_display %}
{% block page_link %}
    <link rel="stylesheet" href="../../static/system_setup/css/style.css">
    <link rel="stylesheet" href="../../static/public_file/css/ApprovalBox.css">
{% endblock %}
{% block style %}
    <style>
        .add_class {
            background: #1E90FF;
        }

        .button_for_control {
            width: 90px;height: 30px;border: 1px solid #99D3F5;background: #D0EEFF;border-radius: 4px;letter-spacing: 0;line-height: 30px;color: #089bab;margin: 5px 0;
        }
        .TopNavigation {
            height: 40px;line-height: 40px;letter-spacing: 2px;display: inline-block;vertical-align: top;cursor: pointer;text-align: center;width: 100px;
        }
        .ActiveTop {
            color: #00a0e9;border-bottom: #00a0e9 solid 2px;
        }
    </style>

{% endblock %}

{% block right_content %}
    <div style="width: 100%; height: 100%; background: white;">
        <div class="headline" style="background: white;border-bottom: #cfcfcf solid 1px;">
            <div id="score_detail" onclick="change_tap(1)" class="TopNavigation ActiveTop">考评详情</div>
            <div id="score_flow" onclick="change_tap(2)" class="TopNavigation">流程图</div>

            <div id="" style="width: 100px;float: right;text-align: center;margin-right: 1%;height: 40px;">
                <button id="" onmousemove="page_zhanshi()" onmouseout="page_yincang()"
                        style="width: 100px;height: 30px;line-height: 27px;border: #1E90FF solid 1px;background: #1E90FF;color: white;margin-top: 5px;border-radius: 3px;">
                    操作
                </button>
            </div>

            <div id="page_one" onmousemove="page_zhanshi()" onmouseout="page_yincang()" style="z-index: 1000; position: absolute; width: 100px; height: auto;right: 0.9%; top: 80px;background: #FFFFFF; box-shadow: rgb(204 204 204) 2px 2px 10px;padding: 5px;display: none;">
                <button onclick="print_topics()" class="button_for_control">
                    打印
                </button>
                {% if is_audit == 'true' %}
                    <button id="approve" onclick="online_approval_tag()" class="button_for_control">
                        审批
                    </button>
                {% endif %}
            </div>
        </div>
        <div id="flow_detail" style="width: 100%;height: 95%;">
            <div id="self_check" style="background: white; width: 100%;height: 100%;overflow: auto;">
                <div id="print-self" style="width: 60%;margin-left: 20%;margin-bottom: 100px;">
                    <table style="border-collapse: collapse;width: 100%;margin-top: 30px;">
                        <tr style="width: 100%;">
                            <td colspan="6" style="text-align: center;height: 35px;border: #cfcfcf solid 1px;">
                                <h3 id="title_top">京山市人民医院{{ year_num }}年度医德考评登记表</h3>
                            </td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 10%;text-align: center;height: 35px;line-height: 35px;border: #cfcfcf solid 1px;letter-spacing: 5.5px;">
                                姓&nbsp;&nbsp;&nbsp;&nbsp;名
                            </td>
                            <td id="user_name" style="width: 23%;padding-left: 0.5%;height: 35px;line-height: 35px;border: #cfcfcf solid 1px;">
                                {{ obj.apply_user.real_name }}
                            </td>
                            <td style="width: 10%;text-align: center;height: 35px;line-height: 35px;border: #cfcfcf solid 1px;letter-spacing: 5.5px;">
                                性&nbsp;&nbsp;&nbsp;&nbsp;别
                            </td>
                            <td style="width: 23%;height: 35px;line-height: 35px;border: #cfcfcf solid 1px;padding-left: 0.5%;">
                                {% if obj.gender == 'male' %}
                                    男
                                {% else %}
                                    女
                                {% endif %}
                            </td>
                            <td style="width: 11%;text-align: center;height: 35px;line-height: 35px;border: #cfcfcf solid 1px;letter-spacing: 5px;">出生年月</td>
                            <td style="width: 23%;padding-left: 0.5%;height: 35px;line-height: 35px;border: #cfcfcf solid 1px;" class="jeinput_1" id="birthday">
                                {{ obj.birthday_date }}
                            </td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 10%;text-align: center;height: 35px;line-height: 35px;border: #cfcfcf solid 1px;letter-spacing: 5px;">政治面貌</td>
                            <td style="width: 23%;height: 35px;line-height: 35px;border: #cfcfcf solid 1px;padding-left: 0.5%;">
                                {{ obj.political_status }}
                            </td>
                            <td style="width: 10%;text-align: center;height: 35px;line-height: 35px;border: #cfcfcf solid 1px;letter-spacing: 5px;">文化程度</td>
                            <td style="width: 23%;height: 35px;line-height: 35px;border: #cfcfcf solid 1px;padding-left: 0.5%;">
                                {{ obj.education }}
                            </td>
                            <td style="width: 11%;text-align: center;height: 35px;line-height: 35px;border: #cfcfcf solid 1px;letter-spacing: 5.5px;">职&nbsp;&nbsp;&nbsp;&nbsp;称</td>
                            <td style="width: 23%;padding-left: 0.5%;height: 35px;line-height: 35px;border: #cfcfcf solid 1px;outline: none;" id="rank">
                                {{ obj.professional_title }}
                            </td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 10%;text-align: center;height: 35px;line-height: 35px;border: #cfcfcf solid 1px;">参加工作时间</td>
                            <td style="width: 23%;padding-left: 0.5%;height: 35px;line-height: 35px;border: #cfcfcf solid 1px;" class="jeinput_1" id="pysj">{{ obj.employ_date }}</td>
                            <td style="width: 10%;text-align: center;height: 35px;line-height: 35px;border: #cfcfcf solid 1px;letter-spacing: 5px;">科&nbsp;&nbsp;&nbsp;&nbsp;室</td>
                            <td style="width: 23%;padding-left: 0.5%;height: 35px;line-height: 35px;border: #cfcfcf solid 1px;outline: none;" id="work_is">{{ obj.job }}</td>
                            <td style="width: 11%;text-align: center;height: 35px;line-height: 35px;border: #cfcfcf solid 1px;">参评科室/小组</td>
                            <td id="select_depart" style="width: 23%;padding-left: 0.5%;height: 35px;line-height: 35px;border: #cfcfcf solid 1px;cursor: pointer">{{ obj.apply_company_id|search_company }}</td>
                        </tr>
                        <tr>
                            <td style="writing-mode: vertical-lr;width: 10%;height: 600px;border: #cfcfcf solid 1px;font-size: 18px;text-align:center;letter-spacing: 15px">
                                本年度医德医风自评及工作总结
                            </td>
                            <td colspan="5" id="work_text" style="width: 90%;height: 600px;border: #cfcfcf solid 1px;outline: none;vertical-align: top;white-space: pre-wrap;">
                                {{ obj.content }}
                            </td>
                        </tr>
                    </table>
                    <table style="width: 100%;">
                        <tr style="width: 100%;">
                            <td style="width: 10%; text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;letter-spacing: 5px;">综合评价<p style="letter-spacing: 4px;">汇&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;总</p></td>
                            <td style="width: 11%; text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;">优秀</td>
                            <td style="width: 11%; text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;font-size: 22px;">
                                {% if obj.level == 'best' %}
                                    &#10004
                                {% endif %}
                            </td>
                            <td style="width: 11%; text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;">良好</td>
                            <td style="width: 11%; text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;font-size: 22px;">
                                {% if obj.level == 'good' %}
                                    &#10004
                                {% endif %}
                            </td>
                            <td style="width: 11%; text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;">一般</td>
                            <td style="width: 11%; text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;font-size: 22px;">
                                {% if obj.level == 'ordinary' %}
                                    &#10004
                                {% endif %}
                            </td>
                            <td style="width: 11%; text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;">较差</td>
                            <td style="width: 13%; text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;font-size: 22px;">
                                {% if obj.level == 'bad' %}
                                    &#10004
                                {% endif %}
                            </td>
                        </tr>
                        <tr style="width: 100%;">
                            <td colspan="2" style="width: 21%; text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;letter-spacing: 5px;font-size: 16px;"><strong>考评项目</strong></td>
                            <td style="width: 11%;text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;font-size: 16px;"><strong>基础得分</strong></td>
                            <td colspan="5" style="width: 55%; text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;font-size: 16px;"><strong>考评具体内容</strong></td>
                            <td style="width: 13%; text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;font-size: 16px;"><strong>科室评分</strong></td>
                        </tr>

                        <tr style="width: 100%;">
                            <td colspan="2" style="width: 21%; text-align: left;height: 35px;border: #cfcfcf solid 1px;border-top: none;padding-left: 1%;padding-right: 0.5%;">
                                救死扶伤，全心全意为人民服务
                            </td>
                            <td style="width: 11%;text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;">10分</td>
                            <td colspan="5" style="width: 55%;text-align: left;height: 35px;border: #cfcfcf solid 1px;border-top: none;padding-left: 1%;padding-right: 0.5%;">工作认真、负责、细致，责任心强</td>
                            <td style="width: 13%;text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;outline: none;">
                                {% for item in item_list %}
                                    {% if item.data_value == 1 or item.data_value == "1" %}
                                        {{ item.value }}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                        <tr style="width: 100%;">
                            <td colspan="2" rowspan="2" style="width: 21%; text-align: left;height: 35px;border: #cfcfcf solid 1px;border-top: none;padding-left: 1%;padding-right: 0.5%;">
                                尊重病人的人格和权力，为病人保守秘密
                            </td>
                            <td rowspan="2" style="width: 11%;text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;">15分</td>
                            <td colspan="5" style="width: 55%;text-align: left;height: 35px;border: #cfcfcf solid 1px;border-top: none;padding-left: 1%;padding-right: 0.5%;">平等对待患者，做到一视同仁，不得歧视患者（5分）</td>
                            <td style="width: 13%;text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;outline: none;">
                                {% for item in item_list %}
                                    {% if item.data_value == 2 or item.data_value == "2" %}
                                        {{ item.value }}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                        <tr>
                            <td colspan="5" style="width: 55%;text-align: left;height: 35px;border: #cfcfcf solid 1px;border-top: none;padding-left: 1%;padding-right: 0.5%;">尊重患者知情权、选择权和隐私权，为患者保守医疗秘密（10分）</td>
                            <td style="width: 13%;text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;outline: none;">
                                {% for item in item_list %}
                                    {% if item.data_value == 3 or item.data_value == "3" %}
                                        {{ item.value }}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                        <tr style="width: 100%;">
                            <td colspan="2" rowspan="3" style="width: 21%; text-align: left;height: 35px;border: #cfcfcf solid 1px;border-top: none;padding-left: 1%;padding-right: 0.5%;">
                                文明礼貌，优质服务，构建和谐医患关系
                            </td>
                            <td rowspan="3" style="width: 11%;text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;">15分</td>
                            <td colspan="5" style="width: 55%;text-align: left;height: 35px;border: #cfcfcf solid 1px;border-top: none;padding-left: 1%;padding-right: 0.5%;">服务热情周到，态度和蔼可亲，无“生、冷、硬、顶、推、拖”现象（5分）</td>
                            <td style="width: 13%;text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;outline: none;">
                                {% for item in item_list %}
                                    {% if item.data_value == 4 or item.data_value == "4" %}
                                        {{ item.value }}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                        <tr>
                            <td colspan="5" style="width: 55%;text-align: left;height: 35px;border: #cfcfcf solid 1px;border-top: none;padding-left: 1%;padding-right: 0.5%;">着装整洁，举止端庄，语言文明规范（5分）</td>
                            <td style="width: 13%;text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;outline: none;">
                                {% for item in item_list %}
                                    {% if item.data_value == 5 or item.data_value == "5" %}
                                        {{ item.value }}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                        <tr>
                            <td colspan="5" style="width: 55%;text-align: left;height: 35px;border: #cfcfcf solid 1px;border-top: none;padding-left: 1%;padding-right: 0.5%;">认真践行医疗服务承诺，加强与患者的交流沟通，自觉接受监督，构建和谐医患关系（5分）</td>
                            <td style="width: 13%;text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;outline: none;">
                                {% for item in item_list %}
                                    {% if item.data_value == 6 or item.data_value == "6" %}
                                        {{ item.value }}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                        <tr style="width: 100%;">
                            <td colspan="2" rowspan="2" style="width: 21%; text-align: left;height: 35px;border: #cfcfcf solid 1px;border-top: none;padding-left: 1%;padding-right: 0.5%;">
                                遵纪守法，廉洁行医
                            </td>
                            <td rowspan="2" style="width: 11%;text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;">20分</td>
                            <td colspan="5" style="width: 55%;text-align: left;height: 35px;border: #cfcfcf solid 1px;border-top: none;padding-left: 1%;padding-right: 0.5%;">坚持廉洁行医，拒收患者或家属的红包等财物，自觉抵制回扣等各种形式商业贿赂，严格执行《医疗机构工作人员廉洁从业九项准则》规定（10分）</td>
                            <td style="width: 13%;text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;outline: none;">
                                {% for item in item_list %}
                                    {% if item.data_value == 7 or item.data_value == "7" %}
                                        {{ item.value }}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                        <tr>
                            <td colspan="5" style="width: 55%;text-align: left;height: 35px;border: #cfcfcf solid 1px;border-top: none;padding-left: 1%;padding-right: 0.5%;">不开具虚假医学证明，不参与虚假医疗广告宣传和药品医疗器械促销，不隐匿、伪造或违反规定涂改、销毁医学文书及有关资料（10分）</td>
                            <td style="width: 13%;text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;outline: none;">
                                {% for item in item_list %}
                                    {% if item.data_value == 8 or item.data_value == "8" %}
                                        {{ item.value }}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                        <tr style="width: 100%;">
                            <td colspan="2" rowspan="3" style="width: 21%; text-align: left;height: 35px;border: #cfcfcf solid 1px;border-top: none;padding-left: 1%;padding-right: 0.5%;">
                                因病施治，规范医疗服务行为
                            </td>
                            <td rowspan="3" style="width: 11%;text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;">20分</td>
                            <td colspan="5" style="width: 55%;text-align: left;height: 35px;border: #cfcfcf solid 1px;border-top: none;padding-left: 1%;padding-right: 0.5%;">坚持合理检查、合理治疗、合理用药（5分）</td>
                            <td style="width: 13%;text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;outline: none;">
                                {% for item in item_list %}
                                    {% if item.data_value == 9 or item.data_value == "9" %}
                                        {{ item.value }}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                        <tr>
                            <td colspan="5" style="width: 55%;text-align: left;height: 35px;border: #cfcfcf solid 1px;border-top: none;padding-left: 1%;padding-right: 0.5%;">认真落实有关控制医药费用的制度措施（5分）</td>
                            <td style="width: 13%;text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;outline: none;">
                                {% for item in item_list %}
                                    {% if item.data_value == 10 or item.data_value == "10" %}
                                        {{ item.value }}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                        <tr>
                            <td colspan="5" style="width: 55%;text-align: left;height: 35px;border: #cfcfcf solid 1px;border-top: none;padding-left: 1%;padding-right: 0.5%;">严格执行医疗服务和药品价格政策，不多收、乱收和私自收取费用（10分）</td>
                            <td style="width: 13%;text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;outline: none;">
                                {% for item in item_list %}
                                    {% if item.data_value == 11 or item.data_value == "11" %}
                                        {{ item.value }}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                        <tr style="width: 100%;">
                            <td colspan="2" style="width: 21%; text-align: left;height: 35px;border: #cfcfcf solid 1px;border-top: none;padding-left: 1%;padding-right: 0.5%;">
                                顾全大局，团结协作，和谐共事
                            </td>
                            <td style="width: 11%;text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;">10分</td>
                            <td colspan="5" style="width: 55%;text-align: left;height: 35px;border: #cfcfcf solid 1px;border-top: none;padding-left: 1%;padding-right: 0.5%;">顾全大局，团结协作，和谐共事</td>
                            <td style="width: 13%;text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;outline: none;">
                                {% for item in item_list %}
                                    {% if item.data_value == 12 or item.data_value == "12" %}
                                        {{ item.value }}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                        <tr style="width: 100%;">
                            <td colspan="2" style="width: 21%; text-align: left;height: 35px;border: #cfcfcf solid 1px;border-top: none;padding-left: 1%;padding-right: 0.5%;">
                                严谨求实，努力提高专业技术水平
                            </td>
                            <td style="width: 11%;text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;">10分</td>
                            <td colspan="5" style="width: 55%;text-align: left;height: 35px;border: #cfcfcf solid 1px;border-top: none;padding-left: 1%;padding-right: 0.5%;">严谨求实，努力提高专业技术水平</td>
                            <td style="width: 13%;text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;outline: none;">
                                {% for item in item_list %}
                                    {% if item.data_value == 13 or item.data_value == "13" %}
                                        {{ item.value }}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                        <tr style="width: 100%;">
                            <td colspan="8" style="width: 87%; text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;font-size: 16px;"><strong>考评得分</strong></td>
                            <td style="width: 13%;text-align: center;height: 35px;border: #cfcfcf solid 1px;border-top: none;outline: none;">{{ obj.total_score }}</td>
                        </tr>
                        <tr style="width: 100%;">
                            <td colspan="3" style="width: 33%;height: 350px;border: #cfcfcf solid 1px;border-top: none;font-size: 16px;vertical-align: top;">
                                <p style="width: 100%;height: 50px;line-height: 35px;padding-left: 1%;">科室（病区）意见：</p>
                                <p style="width: 100%;height: 150px;padding-left: 1%;line-height: 30px;padding-top: 50px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;经科室综合评价，同意<br>&nbsp;&nbsp;&nbsp;&nbsp;评为
                                    <label for="" style="width: 100px;text-align: center;"><strong>{{ level }}</strong></label> 等级。</p>
                                <p style="width: 100%;height: 100px;line-height: 35px;padding-left: 1%;">
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;负责人签名：
                                    {% for audit in audit_list %}
                                        {% if audit.node == 'one' and audit.state != "unaudit" %}
                                            {% if audit.signature_picture == '/media/' %}
                                                {{ audit.audit_people }}
                                            {% else %}
                                                <img src="{{ audit.signature_picture }}" style="height: 100px;width: 150px;" alt="">
                                            {% endif %}
                                        {% endif %}
                                    {% endfor %}
                                </p>

                                {% if one_appove_time %}
                                    <p style="width: 100%;height: 50px;padding-right: 3%;text-align: right;line-height: 50px;">
                                       {{ one_appove_time|date:'Y' }} 年 {{ one_appove_time|date:'m' }} 月 {{ one_appove_time|date:'d' }} 日
                                    </p>
                                {% else %}
                                    <p style="width: 100%;height: 50px;padding-right: 3%;text-align: right;letter-spacing: 15px;line-height: 50px;">
                                        年   月   日
                                    </p>
                                {% endif %}

                            </td>
                            <td colspan="3" style="width: 33%;height: 350px;border: #cfcfcf solid 1px;border-top: none;font-size: 16px;vertical-align: top;">
                                <p style="width: 100%;height: 50px;line-height: 35px;padding-left: 1%;">被考核人意见：</p>
                                <p style="width: 100%;height: 150px;padding-left: 1%;line-height: 30px;padding-top: 50px;">{{ two_appove_audit }}</p>
                                <p style="width: 100%;height: 100px;line-height: 35px;padding-left: 1%;">
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;签名：
                                    {% for audit in audit_list %}
                                        {% if audit.node == 'two' and audit.state != "unaudit" %}
                                            {% if audit.signature_picture == '/media/' %}
                                                {{ audit.audit_people }}
                                            {% else %}
                                                <img src="{{ audit.signature_picture }}" style="height: 100px;width: 150px;" alt="">
                                            {% endif %}
                                        {% endif %}
                                    {% endfor %}
                                </p>

                                {% if two_appove_time %}
                                    <p style="width: 100%;height: 50px;padding-right: 3%;text-align: right;line-height: 50px;">
                                        {{ two_appove_time|date:'Y' }} 年 {{ two_appove_time|date:'m' }} 月 {{ two_appove_time|date:'d' }} 日
                                    </p>
                                {% else %}
                                    <p style="width: 100%;height: 50px;padding-right: 3%;text-align: right;letter-spacing: 15px;line-height: 50px;">
                                        年   月   日
                                    </p>
                                {% endif %}
                            </td>
                            <td colspan="3" style="width: 34%;height: 350px;border: #cfcfcf solid 1px;border-top: none;font-size: 16px;vertical-align: top;">
                                <p style="width: 100%;height: 50px;line-height: 35px;padding-left: 1%;">考评小组综合评价得分及意见：</p>
                                <p style="width: 100%;height: 150px;padding-left: 1%;line-height: 30px;padding-top: 50px;">{{ three_appove_audit }}</p>
                                <p style="width: 100%;height: 100px;line-height: 35px;padding-left: 1%;">
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;单位盖章：
                                    {% if obj.state == 'five' %}
                                        <img src="../../static/personal_center/测试专用章/医德医风.png" style="height: 150px;width: 150px;" alt="">
                                    {% endif %}
                                </p>
                                {% if three_appove_time %}
                                    <p style="width: 100%;height: 50px;padding-right: 3%;text-align: right;line-height: 50px;">
                                        {{ three_appove_time|date:'Y' }} 年 {{ three_appove_time|date:'m' }} 月 {{ three_appove_time|date:'d' }} 日
                                    </p>
                                {% else %}
                                    <p style="width: 100%;height: 50px;padding-right: 3%;text-align: right;letter-spacing: 15px;line-height: 50px;">
                                        年   月   日
                                    </p>
                                {% endif %}
                            </td>
                        </tr>
                        <tr style="width: 100%;">
                            <td colspan="9" style="text-align: left;height: 35px;border: #cfcfcf solid 1px;border-top: none;padding-left: 1%;padding-right: 0.5%;color: red;font-size: 15px;">
                                <strong>注：1.优秀：90-100分；良好：80-89分；一般：60-79分；较差：60分以下。2.获得考评优秀的人数不超过各科室总人数的15%。</strong>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
        <div id="flow_chart" style="width: 100%;height: 95%;display: none;">
            <div style="width: 100%;height: 40%;text-align: center;margin: 20% auto;">
                <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                    <div style="text-align: center;color: #0d8ddb;">
                        <br>
                        流程发起
                    </div>
                    <div style="width: 50px;height: 25px;border-radius: 3px;background: #0d8ddb;color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                        start
                    </div>
                </div>
                {% if 'two' in flow_dict %}
                    {% for k,v in flow_dict.items %}
                        {% if k == 'two' %}
                            <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                            <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                                <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                    ({{ v.apply_people }})<br>
                                    申请人签字确认
                                </div>
                                <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                    {{ v.sear }}
                                </div>
                            </div>
                        {% endif %}
                    {% endfor %}
                {% endif %}

                {% if 'one' in flow_dict %}
                    {% for k,v in flow_dict.items %}
                        {% if k == 'one' %}
                            <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                            <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                                <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                    ({{ v.apply_people }})<br>
                                    参评科室/小组评分
                                </div>
                                <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                    {{ v.sear }}
                                </div>
                            </div>
                        {% endif %}
                    {% endfor %}
                {% endif %}

                {% if 'three' in flow_dict %}
                    {% for k,v in flow_dict.items %}
                        {% if k == 'three' %}
                            <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                            <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                                <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                    {% if v.apply_people %}
                                        ({{ v.apply_people }})<br>
                                    {% else %}
                                        <br>
                                    {% endif %}
                                    考评小组确认
                                </div>
                                <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                    {{ v.sear }}
                                </div>
                            </div>
                        {% endif %}
                    {% endfor %}
                {% endif %}

                <div style="display: inline-block;border: #0d8ddb solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                    <div style="text-align: center;color: #0d8ddb;">
                        <span style="visibility: hidden;">({{ obj.user.real_name }})</span><br>
                        结束
                    </div>
                    <div style="width: 50px;height: 25px;border-radius: 3px;background: #0d8ddb;color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                        ending
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div id="appave-model" class="approval-shade">
        <div id="examine-model" style="width: 700px;background: white;left: 50%;top: 50%;position: absolute;transform: translate(-50%, -50%);">
            <div id="appave-title" style="width: 100%;height: 40px;border-bottom: #cfcfcf solid 1px;font-size: 14px;cursor: move;">
                <div style="width: 40%;height: 40px;line-height: 40px;text-align: left;padding-left: 1%;letter-spacing: 2px;float: left;">
                    {% if obj.state == 'one' %}审批{% else %}签名{% endif %}
                </div>
                <div style="width: 59%;height: 40px;letter-spacing: 2px;float: left;">
                    <div onclick="close_approval_models()" style="width: 40px;height: 40px;text-align: center;line-height: 40px;cursor: pointer;float: right;">
                        <i class="iconfont icon-quchu"></i>
                    </div>
                </div>
            </div>

            <div style="width: 100%;font-size: 14px;background: #E8E8E8;padding-top: 1%;">
                {% if obj.state == 'one' or obj.state == 'seven' %}
                    <div style="width: 98%;height: 450px;margin-left: 1%;background: white;padding-top: 1%;padding-left: 1%;border-radius: 3px;">
                        <div style="width: 100%;height: 35px;line-height: 35px;border-bottom: #E8E8E8 solid 1px;padding-left: 1%;">
                            评分信息
                        </div>
                        <div style="width: 100%;height: 405px;overflow: auto;">
                            <table style="width: 100%;border-collapse: collapse;">
                                <tr style="width: 100%;">
                                    <td style="width: 80%;border: #cfcfcf solid 1px;text-align: center;height: 35px;border-top: none;"><strong>考评具体内容</strong></td>
                                    <td style="width: 80%;border: #cfcfcf solid 1px;text-align: center;height: 35px;border-top: none;"><strong>科室评分</strong></td>
                                </tr>
                                <tr style="width: 100%;">
                                    <td style="width: 80%;border: #cfcfcf solid 1px;padding-left: 0.5%;height: 35px;">工作认真、负责、细致，责任心强（10分）</td>
                                    <td style="width: 80%;border: #cfcfcf solid 1px;text-align: center;height: 35px;">
                                        <input type="number" class="fraction_number" data-value="1" onblur="fraction(10, this)" style="width: 100%;height: 100%;border: none;outline: none;text-align: center;" inputmode="numeric" min="0" max="10"
                                                {% for item in item_list %}
                                                    {% if item.data_value == 1 or item.data_value == "1" %}
                                                        value="{{ item.value }}"
                                                    {% endif %}
                                                {% endfor %}>
                                    </td>
                                </tr>
                                <tr style="width: 100%;">
                                    <td style="width: 80%;border: #cfcfcf solid 1px;padding-left: 0.5%;height: 35px;">平等对待患者，做到一视同仁，不得歧视患者（5分）</td>
                                    <td style="width: 80%;border: #cfcfcf solid 1px;text-align: center;height: 35px;">
                                        <input type="number" class="fraction_number" data-value="2" onblur="fraction(5, this)" style="width: 100%;height: 100%;border: none;outline: none;text-align: center;" inputmode="numeric" min="0" max="5"
                                        {% for item in item_list %}
                                            {% if item.data_value == 2 or item.data_value == "2" %}
                                                value="{{ item.value }}"
                                            {% endif %}
                                        {% endfor %}>
                                    </td>
                                </tr>
                                <tr style="width: 100%;">
                                    <td style="width: 80%;border: #cfcfcf solid 1px;padding-left: 0.5%;height: 35px;">尊重患者知情权、选择权和隐私权，为患者保守医疗秘密（10分）</td>
                                    <td style="width: 80%;border: #cfcfcf solid 1px;text-align: center;height: 35px;">
                                        <input type="number" class="fraction_number" data-value="3" onblur="fraction(10, this)" style="width: 100%;height: 100%;border: none;outline: none;text-align: center;" inputmode="numeric" min="0" max="10"
                                        {% for item in item_list %}
                                            {% if item.data_value == 3 or item.data_value == "3" %}
                                                value="{{ item.value }}"
                                            {% endif %}
                                        {% endfor %}>
                                    </td>
                                </tr>
                                <tr style="width: 100%;">
                                    <td style="width: 80%;border: #cfcfcf solid 1px;padding-left: 0.5%;height: 35px;">服务热情周到，态度和蔼可亲，无“生、冷、硬、顶、推、拖”现象（5分）</td>
                                    <td style="width: 80%;border: #cfcfcf solid 1px;text-align: center;height: 35px;">
                                        <input type="number" class="fraction_number" data-value="4" onblur="fraction(5, this)" style="width: 100%;height: 100%;border: none;outline: none;text-align: center;" inputmode="numeric" min="0" max="5"
                                        {% for item in item_list %}
                                            {% if item.data_value == 4 or item.data_value == "4" %}
                                                value="{{ item.value }}"
                                            {% endif %}
                                        {% endfor %}>
                                    </td>
                                </tr>
                                <tr style="width: 100%;">
                                    <td style="width: 80%;border: #cfcfcf solid 1px;padding-left: 0.5%;height: 35px;">着装整洁，举止端庄，语言文明规范（5分）</td>
                                    <td style="width: 80%;border: #cfcfcf solid 1px;text-align: center;height: 35px;">
                                        <input type="number" class="fraction_number" data-value="5" onblur="fraction(5, this)" style="width: 100%;height: 100%;border: none;outline: none;text-align: center;" inputmode="numeric" min="0" max="5"
                                        {% for item in item_list %}
                                            {% if item.data_value == 5 or item.data_value == "5" %}
                                                value="{{ item.value }}"
                                            {% endif %}
                                        {% endfor %}>
                                    </td>
                                </tr>
                                <tr style="width: 100%;">
                                    <td style="width: 80%;border: #cfcfcf solid 1px;padding-left: 0.5%;height: 35px;">认真践行医疗服务承诺，加强与患者的交流沟通，自觉接受监督，构建和谐医患关系（5分）</td>
                                    <td style="width: 80%;border: #cfcfcf solid 1px;text-align: center;height: 35px;">
                                        <input type="number" class="fraction_number" data-value="6" onblur="fraction(5, this)" style="width: 100%;height: 100%;border: none;outline: none;text-align: center;" inputmode="numeric" min="0" max="5"
                                        {% for item in item_list %}
                                            {% if item.data_value == 6 or item.data_value == "6" %}
                                                value="{{ item.value }}"
                                            {% endif %}
                                        {% endfor %}>
                                    </td>
                                </tr>
                                <tr style="width: 100%;">
                                    <td style="width: 80%;border: #cfcfcf solid 1px;padding-left: 0.5%;height: 35px;">坚持廉洁行医，拒收患者或家属的红包等财物，自觉抵制回扣等各种形式商业贿赂，严格执行《医疗机构工作人员廉洁从业九项准则》规定（10分）</td>
                                    <td style="width: 80%;border: #cfcfcf solid 1px;text-align: center;height: 35px;">
                                        <input type="number" class="fraction_number" data-value="7" onblur="fraction(10, this)" style="width: 100%;height: 100%;border: none;outline: none;text-align: center;" inputmode="numeric" min="0" max="10"
                                        {% for item in item_list %}
                                            {% if item.data_value == 7 or item.data_value == "7" %}
                                                value="{{ item.value }}"
                                            {% endif %}
                                        {% endfor %}>
                                    </td>
                                </tr>
                                <tr style="width: 100%;">
                                    <td style="width: 80%;border: #cfcfcf solid 1px;padding-left: 0.5%;height: 35px;">不开具虚假医学证明，不参与虚假医疗广告宣传和药品医疗器械促销，不隐匿、伪造或违反规定涂改、销毁医学文书及有关资料（10分）</td>
                                    <td style="width: 80%;border: #cfcfcf solid 1px;text-align: center;height: 35px;">
                                        <input type="number" class="fraction_number" data-value="8" onblur="fraction(10, this)" style="width: 100%;height: 100%;border: none;outline: none;text-align: center;" inputmode="numeric" min="0" max="10"
                                        {% for item in item_list %}
                                            {% if item.data_value == 8 or item.data_value == "8" %}
                                                value="{{ item.value }}"
                                            {% endif %}
                                        {% endfor %}>
                                    </td>
                                </tr>
                                <tr style="width: 100%;">
                                    <td style="width: 80%;border: #cfcfcf solid 1px;padding-left: 0.5%;height: 35px;">坚持合理检查、合理治疗、合理用药（5分）</td>
                                    <td style="width: 80%;border: #cfcfcf solid 1px;text-align: center;height: 35px;">
                                        <input type="number" class="fraction_number" data-value="9" onblur="fraction(5, this)" style="width: 100%;height: 100%;border: none;outline: none;text-align: center;" inputmode="numeric" min="0" max="5"
                                        {% for item in item_list %}
                                            {% if item.data_value == 9 or item.data_value == "9" %}
                                                value="{{ item.value }}"
                                            {% endif %}
                                        {% endfor %}>
                                    </td>
                                </tr>
                                <tr style="width: 100%;">
                                    <td style="width: 80%;border: #cfcfcf solid 1px;padding-left: 0.5%;height: 35px;">认真落实有关控制医药费用的制度措施（5分）</td>
                                    <td style="width: 80%;border: #cfcfcf solid 1px;text-align: center;height: 35px;">
                                        <input type="number" class="fraction_number" data-value="10" onblur="fraction(5, this)" style="width: 100%;height: 100%;border: none;outline: none;text-align: center;" inputmode="numeric" min="0" max="5"
                                        {% for item in item_list %}
                                            {% if item.data_value == 10 or item.data_value == "10" %}
                                                value="{{ item.value }}"
                                            {% endif %}
                                        {% endfor %}>
                                    </td>
                                </tr>
                                <tr style="width: 100%;">
                                    <td style="width: 80%;border: #cfcfcf solid 1px;padding-left: 0.5%;height: 35px;">严格执行医疗服务和药品价格政策，不多收、乱收和私自收取费用（10分）</td>
                                    <td style="width: 80%;border: #cfcfcf solid 1px;text-align: center;height: 35px;">
                                        <input type="number" class="fraction_number" data-value="11" onblur="fraction(10, this)" style="width: 100%;height: 100%;border: none;outline: none;text-align: center;" inputmode="numeric" min="0" max="10"
                                        {% for item in item_list %}
                                            {% if item.data_value == 11 or item.data_value == "11" %}
                                                value="{{ item.value }}"
                                            {% endif %}
                                        {% endfor %}>
                                    </td>
                                </tr>
                                <tr style="width: 100%;">
                                    <td style="width: 80%;border: #cfcfcf solid 1px;padding-left: 0.5%;height: 35px;">顾全大局，团结协作，和谐共事（10分）</td>
                                    <td style="width: 80%;border: #cfcfcf solid 1px;text-align: center;height: 35px;">
                                        <input type="number" class="fraction_number" data-value="12" onblur="fraction(10, this)" style="width: 100%;height: 100%;border: none;outline: none;text-align: center;" inputmode="numeric" min="0" max="10"
                                        {% for item in item_list %}
                                            {% if item.data_value == 12 or item.data_value == "12" %}
                                                value="{{ item.value }}"
                                            {% endif %}
                                        {% endfor %}>
                                    </td>
                                </tr>
                                <tr style="width: 100%;">
                                    <td style="width: 80%;border: #cfcfcf solid 1px;padding-left: 0.5%;height: 35px;">严谨求实，努力提高专业技术水平（10分）</td>
                                    <td style="width: 80%;border: #cfcfcf solid 1px;text-align: center;height: 35px;">
                                        <input type="number" class="fraction_number" data-value="13" onblur="fraction(10, this)" style="width: 100%;height: 100%;border: none;outline: none;text-align: center;" inputmode="numeric" min="0" max="10"
                                        {% for item in item_list %}
                                            {% if item.data_value == 13 or item.data_value == "13" %}
                                                value="{{ item.value }}"
                                            {% endif %}
                                        {% endfor %}>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                {% endif %}

                <div style="width: 98%;margin-left: 1%;background: white;padding-top: 1%;padding-left: 1%;border-radius: 3px;margin-top: 1%;padding-right: 1%;padding-bottom: 20px;">
                    <div style="width: 100%;height: 35px;line-height: 35px;border-bottom: #E8E8E8 solid 1px;padding-left: 1%;">
                        总分
                        <div id="total_fraction" style="width: 100px;height: 100%;float: right;text-align: center;">{{ obj.total_score }}</div>
                    </div>
                    <div style="width: 100%;color: red;padding-top: 5px;">
                        <strong>注：<br>1.优秀：90-100分；良好：80-89分；一般：60-79分；较差：60分以下。<br>2.获得考评优秀的人数不超过各科室总人数的15%。<br>3.科室评分结果需在【<a
                                href="DepartmentSummary.html">科室考核汇总</a>】提交，提交后无法修改！</strong>
                    </div>
                </div>

                <div style="width: 100%;height: 40px;background: white;margin-top: 1%;text-align: right;padding-right: 2%;">
                    <button onclick="summit_data()" style="letter-spacing: 3px;width: 100px;height: 30px;margin-top: 5px;border-radius: 1px;border: #00a0e9 solid 1px;text-align: center;background: #00a0e9;color: white;">保存</button>
                    <button onclick="ReturnForModification()" style="letter-spacing: 3px;width: 100px;height: 30px;margin-top: 5px;border-radius: 1px;border: #00a0e9 solid 1px;text-align: center;background: #00a0e9;color: white;">退回修改</button>
                </div>
            </div>
        </div>
    </div>
{% endblock %}

{% block script %}
    <script type="text/javascript" src="../../static/personal_center/js/jquery.jqprint-0.3.js"></script>
    <script type="text/javascript" src="../../static/public_file/js/ApprovalBox.js"></script>
    <script>
        window.onload = function () {
            document.getElementById("personage").className = "add_class";
            document.getElementById("process_management").className = "add_class";
        };

        function summit_data() {
            var present_id = "{{ obj.id }}";
            var form = new FormData();
            var item_list = [];
            var fraction_number = document.getElementsByClassName("fraction_number");
            for (var i=0; i<fraction_number.length; i++) {
                if (!fraction_number[i].value) {
                    alert("请检查打分项是否有未打分项！")
                    return false
                }
                item_list.push({"data_value": fraction_number[i].getAttribute("data-value"), "value": fraction_number[i].value})
            }
            var total_number = document.getElementById("total_fraction").innerText;
            form.append('item_list', JSON.stringify(item_list));
            form.append('total_score', total_number);
            form.append('id', present_id);

            document.getElementById("loading").style.display = "inline-block";
            var xhr = new XMLHttpRequest();
            xhr.open('post', "/medical-ethics/medical_ethics_detail_view");
            xhr.send(form);
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        if (JsonDate["code"] === 200) {
                            alert("保存成功!");
                            window.location.href = "/medical-ethics/DepartmentSummary.html";
                        } else {
                            alert(JsonDate["message"]);
                        }
                    }
                }
            };
        }

        function fraction(number, objs) {
            var revs = /^[0-9]+.?[0-9]*$/;
            if (!revs.test(objs.value)) {
                objs.value = ''
                return false
            }

            if (parseInt(objs.value) < parseFloat(objs.value)) {
                objs.value = parseFloat(objs.value).toFixed(1);
            }

            var this_number = parseFloat(objs.value);
            if (this_number > number) {
                objs.value = number;
            }
            var fraction_number = document.getElementsByClassName("fraction_number");
            var total_number = 0;
            for (var i=0; i<fraction_number.length; i++) {
                if (fraction_number[i].value) {
                    total_number += parseFloat(fraction_number[i].value);
                }
            }
            document.getElementById("total_fraction").innerText = total_number.toFixed(1);
        }

        function page_zhanshi() {
            document.getElementById('page_one').style.display = 'inline-block';
        }

        function page_yincang() {
            document.getElementById('page_one').style.display = 'none';
        }

        function print_topics() {
            $('#print-self').jqprint({
                debug: false,
                importCSS: true,
                printContainer: true,
                operaSupport: false
            });
        }

        function change_tap(change_number) {
            if (change_number === 1) {
                document.getElementById("score_detail").className = "TopNavigation ActiveTop"
                document.getElementById("score_flow").className = "TopNavigation";
                document.getElementById("flow_detail").style.display = "inline-block";
                document.getElementById("flow_chart").style.display = "none";
            }else {
                document.getElementById("score_flow").className = "TopNavigation ActiveTop"
                document.getElementById("score_detail").className = "TopNavigation";
                document.getElementById("flow_chart").style.display = "inline-block";
                document.getElementById("flow_detail").style.display = "none";
            }
        }

        function ReturnForModification() {
            var present_id = "{{ obj.id }}";
            var form = new FormData();
            form.append('id', present_id);

            document.getElementById("loading").style.display = "inline-block";
            var xhr = new XMLHttpRequest();
            xhr.open('post', "/medical-ethics/ReturnModification");
            xhr.send(form);
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        if (JsonDate["code"] === 200) {
                            alert("操作成功!");
                            window.location.href = "/medical-ethics/DepartmentSummary.html";
                        } else {
                            alert(JsonDate["message"]);
                        }
                    }
                }
            };
        }
    </script>
{% endblock %}